<?php

class User_Controller extends CI_Controller 
{
	function __construct()
	{
		parent::__construct();
		$this->is_user();
	}

	protected function is_user()
	{
		$this->load->library('session');
		$is_user = $this->session->userdata('is_user');
		if(!isset($is_user) || $is_user != true)
		{
			echo 'You don\'t have permission to access this page. <a href="../../login">Login</a>';	
			die();		
			//$this->load->view('login_form');
		}		
	}	

}

?>
